﻿#ifndef USERSERVICE_H
#define USERSERVICE_H

#include <QObject>
#include "userdao.h"

class UserService : public QObject
{
    Q_OBJECT
public:
    explicit UserService(QObject *parent = nullptr);
    ~UserService();
    bool getList(QList<User> &list);
    bool getPageList(uint64_t &total,QList<User> &users,const  uint64_t &page,const  uint64_t &pageSize);
    bool getOne(User &object);
    bool saveOne(User &object);
    bool deleteOne(User &object);
private:
    QSqlDatabase db;
};

#endif // USERSERVICE_H
